package com.shopping.bean;

import java.math.BigDecimal;
import java.util.Date;

public class Order {
    private int orderid;
    private int userid;
    private Date ordertime;
    private BigDecimal money;
    private String status;
    private int addressid;
    private int isupset;
    private String code;
    private OrderAddress address;

    private Date paymenttime;

    private String name;

    private String tel;
    private int isdel;

    public OrderAddress getAddress() {
        return address;
    }

    public Date getPaymenttime() {
        return paymenttime;
    }

    public void setPaymenttime(Date paymenttime) {
        this.paymenttime = paymenttime;
    }

    public void setAddress(OrderAddress address) {
        this.address = address;
    }

    @Override
    public String toString() {
        return "Order{" +
                "orderid=" + orderid +
                ", userid=" + userid +
                ", ordertime=" + ordertime +
                ", money=" + money +
                ", status='" + status + '\'' +
                ", addressid=" + addressid +
                ", isupset=" + isupset +
                ", code='" + code + '\'' +
                ", address=" + address +
                ", paymenttime=" + paymenttime +
                '}';
    }

    public int getIsdel() {
        return isdel;
    }

    public void setIsdel(int isdel) {
        this.isdel = isdel;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public int getOrderid() {
        return orderid;
    }

    public void setOrderid(int orderid) {
        this.orderid = orderid;
    }

    public int getUserid() {
        return userid;
    }

    public void setUserid(int userid) {
        this.userid = userid;
    }

    public Date getOrdertime() {
        return ordertime;
    }

    public void setOrdertime(Date ordertime) {
        this.ordertime = ordertime;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public int getAddressid() {
        return addressid;
    }

    public void setAddressid(int addressid) {
        this.addressid = addressid;
    }

    public int getIsupset() {
        return isupset;
    }

    public void setIsupset(int isupset) {
        this.isupset = isupset;
    }

    public String getAddressString() {
        return address != null ? address.getAddress() : null;
    }
}
